
pkgname=db
pkgver=5.3.28
pkgrel=4
pkgdesc="The Berkeley DB embedded database system"
arch=('x86_64')
url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
license=('custom')
depends=('gcc-libs' 'sh')
options=('!libtool')
source=("http://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz")
md5sums=('b99454564d5b4479750567031d66fe24')

build() {
  cd $pkgname-${pkgver}/build_unix
  
  ../dist/configure --prefix=/usr \
     --enable-compat185 \
     --enable-shared \
     --enable-static \
     --enable-cxx \
     --enable-dbm
  make LIBSO_LIBS=-lpthread
}

package() {
  cd $pkgname-${pkgver}/build_unix
  make DESTDIR=${pkgdir} install
  
  rm -rf ${pkgdir}/usr/docs
  install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE \
    ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
